﻿<%@ Page Title="" Language="C#" MasterPageFile="~/ZFMaster.Master" AutoEventWireup="true"
    CodeBehind="oyzx.aspx.cs" Inherits="ZF.WS.service.oyzx" %>
  <%@ Register src="/UserControls/SWFUpLoad.ascx" tagname="SWFUpLoad" tagprefix="uc1" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <link href="/css/validator.css" rel="stylesheet" type="text/css" />

    <script src="/js/formValidator.js" type="text/javascript" language="javascript"></script>

    <script src="/js/formValidatorRegex.js" type="text/javascript" language="javascript"></script>

    <script src="/js/jqPlugins/onlypressnum.js" type="text/javascript" language="javascript"></script>

    <script language='javascript' type="text/javascript">
        function refreshValidateCodeImage(ValidateCodeImageControl) {

            var url = ValidateCodeImageControl.src;
            if (url.indexOf("?code=") > -1) {
                url = url.split("?")[0];
            }
            ValidateCodeImageControl.src = url + '?code=' + randomNum(10);
        }
        function randomNum(n) {
            var rnd = '';
            for (var i = 0; i < n; i++)
                rnd += Math.floor(Math.random() * 10);
            return rnd;

        }
        $(function() {
            $(".vcodeimg")[0].click();

        });
    </script>

    <script>

        $(function() {

            $.formValidator.initConfig({ formid: document.forms[0].id, onerror: function(msg) { alert(msg) } });

            $(".tbAddress").formValidator({ tipid: "tbAddressTip", onshow: "(50个字以内)", onfocus: "(50个字以内)", oncorrect: " ", onempty: "(50个字以内)" })
    .inputValidator({ min: 1, onerror: "请输入物业地址" })
    .inputValidator({ max: 100, onerror: "请输入物业地址超出50个字" });



            $(".tbContact").formValidator({ tipid: "tbContactTip", onshow: "( 如王先生)", onfocus: "( 如王先生)", oncorrect: " ", onempty: "( 如王先生)" })
    .inputValidator({ min: 1, onerror: "输入错误：必须输入联系人" });

            $(".tbTel").formValidator({ tipid: "tbTelTip", onshow: "( 固话号码或手机号码，如果有多个用“，”分隔)", onfocus: "( 固话号码或手机号码，如果有多个用“，”分隔)", oncorrect: " ", onempty: "(  固话号码或手机号码，如果有多个用“，”分隔)" })
    .inputValidator({ min: 1, onerror: "输入错误：请至少输入一个联系电话" });


            //            $(".tbPrice").formValidator({ tipid: "tbPriceTip", onshow: "(人民币：万元)", onfocus: "(人民币：万元)", oncorrect: " ", onempty: "(人民币：万元)" })
            //    .regexValidator({ regexp: "num", datatype: "enum", onerror: "交易价格错误" });
            //    
            $(".tbCredit").formValidator({ tipid: "tbCreditTip", onshow: "(人民币：万元)", onfocus: "(人民币：万元)", oncorrect: " ", onempty: "(人民币：万元)" })
    .regexValidator({ regexp: "num", datatype: "enum", onerror: "交易价格错误" });
            $(".tbEmail").formValidator({ tipid: "tbEmailTip", onshow: "为了便于我们联系您，请输入您的邮箱地址.如:abc@163.com", onfocus: "为了便于我们联系您，请输入您的邮箱地址.如:abc@163.com", oncorrect: " ", onempty: "为了便于我们联系您，请输入您的邮箱地址.如:abc@163.com" })

            .functionValidator({ fun: function(value) {
                var reg = new RegExp("^\\w+((-\\w+)|(\\.\\w+))*\\@[A-Za-z0-9]+((\\.|-)[A-Za-z0-9]+)*\\.[A-Za-z0-9]+$");

                if (value != "" && !reg.test(value))
                    return "输入格式错误";
                else
                    return true;
            }
            });
            $(".tbVCode").formValidator({ tipid: "tbVCodeTip", onshow: " ", onfocus: " ", oncorrect: "", onempty: " " })
    .inputValidator({ min: 1, onerror: "请输入验证码" });
        });
    
    
    </script>

    <div class="location mb10_">
        您现在的位置：<a href="/"><%=SiteInfo.Instance.SystemConfig.SiteName %></a> >> <a href="<%=this.Request.Url %>">
            我要装修</a>
    </div>
    <div>
        <table class="service" cellpadding="1" cellspacing="1">
            <tr>
                <th colspan="2">
                    
                         <span class="fl_">我要装修</span>  
                         
                         <a href="/service/cservice.aspx?type=<%=HttpUtility.UrlDecode("我要装修") %>" target="_blank">
                         <img src="/image/zxzx.gif" class="vam_  mt8_  fr_  mr10_ cp_"      /> </a>
               
                </th>
            </tr>
        <tr>
              <td class="l">
                    <span class=" xh_"></span>联系方式：
                </td>
                 <td class="r" >
                      <div class="f14_">安家易168网服务部 &nbsp;&nbsp; 电话：020-86340680 &nbsp;&nbsp; 电子邮箱：DXB2301@163.com &nbsp;&nbsp; 
                       </div> 
                       
                 </td>
            </tr>
            <tr>
                <td class="l">
                    <span class=" xh_">*</span>装修地址：
                </td>
                <td class="r">
                    <div class="c">
                        <zf:TextBox runat="server" ID="tbAddress" class="lltxt"></zf:TextBox>
                        <span class="zx_" id="tbAddressTip"></span>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="l">
                    装修内容：
                </td>
                <td class="r">
                    <div class="c">
                        <zf:TextBox runat="server" ID="tbContent" TextMode="MultiLine" class="mstxt"></zf:TextBox>
                        <span class="zx_" id="Span1"></span>
                    </div>
                </td>
            </tr>
   
  
                <tr>
                    <td class="l">
                        <div class="c vam_">
                            <span class="xh_"></span>上传图片：最多可上传5张图片：
                        </div>
                    </td>
                    <td class="r" >
                        <div class="c">
                            <uc1:swfupload id="SWFUpLoad1" runat="server" uploadurl="/uploadfile.aspx?type=service"
                                filelimit="5" maxsize="500" filetype="*.gif;*.jpg" />
                            <zf:PlaceHolder ID="PlaceHolder1" runat="server" BindOper="Edit">
                                <zf:TextBox runat="server" ID="tbPhoto" class="dn_"></zf:TextBox>
                                <style>
                                    .ulimg li
                                    {
                                        float: left;
                                        width: 100px;
                                        margin-right: 10px;
                                        text-align: center;
                                    }
                                    .ulimg li img
                                    {
                                        width: 100px;
                                        height: 100px;
                                    }
                                </style>
                                <div class="ulimg">
                                    <zf:ListView runat="server" ID="lvImgList">
                                        <LayoutTemplate>
                                            <ul>
                                                <zf:PlaceHolder ID="itemPlaceHolder" runat="server">
                                                </zf:PlaceHolder>
                                            </ul>
                                        </LayoutTemplate>
                                        <ItemTemplate>
                                            <li>
                                                <img src="/photo/house/<%#Eval("File") %>" />
                                                <input type="button" onclick="DelPhoto(this,'<%#Eval("File") %>')" value="删除图片" />
                                            </li>
                                        </ItemTemplate>
                                    </zf:ListView>
                                </div>

                                <script>

                                    function DelPhoto(obj, file) {
                                        var result = $(".tbPhoto").val().replace(file, "");
                                        $(".tbPhoto").val(result);
                                        $(obj.parentNode).remove();
                                    }
                                </script>

                            </zf:PlaceHolder>
                        </div>
                    </td>
                </tr>
          
            <tr>
                <td class="l">
                    预算金额：
                </td>
                <td class="r">
                    <div class="c">
                        <zf:TextBox runat="server" ID="tbPrice" class="sstxt"></zf:TextBox>
                        <span class="zx_" id="tbPriceTip"></span>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="l">
                    完成时间：
                </td>
                <td class="r">
                    <div class="c">
                        <zf:TextBox runat="server" ID="tbFinishTime" class="dttxt"></zf:TextBox>
                        <span class="zx_" id="tbFinishTimeTip">如：2010-05-06</span>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="l">
                    <span class=" xh_">*</span>联系人：
                </td>
                <td class="r">
                    <div class="c">
                        <zf:TextBox runat="server" ID="tbContact" class="stxt"></zf:TextBox><span class="zx_"
                            id="tbContactTip"></span>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="l">
                    <span class=" xh_">*</span>联系电话：
                </td>
                <td class="r">
                    <div class="c">
                        <zf:TextBox runat="server" ID="tbTel" class="txt"></zf:TextBox>
                        <span class="zx_" id="tbTelTip"></span>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="l">
                    电子邮箱：
                </td>
                <td class="r">
                    <div class="c">
                        <zf:TextBox runat="server" ID="tbEmail" class="txt"></zf:TextBox>
                        <span class="zx_" id="tbEmailTip"></span>
                    </div>
                </td>
            </tr>
            
            
            
            <tr>
                <td class="l">
                    <span class=" xh_">*</span>验证码：
                </td>
                <td class="r">
                    <div class="c">
                        <zf:TextBox runat="server" ID="tbVCode" class="sstxt"></zf:TextBox><img src="/ValidatePage.aspx"
                            style="cursor: pointer" class='vcodeimg' onclick="refreshValidateCodeImage(this);" />
                        <span class="zx_" id="tbVCodeTip"></span>
                    </div>
                </td>
            </tr>
            <tr class="b">
                <td colspan="2">
                    <zf:Button ID="btAdd" class="linkbtn addSubmit" OnClick="AddSubmit" runat="server"
                        Text=" 提 交 "></zf:Button>
                    <input type="button" class="linkbtn" value=" 取 消 " onclick="GoBack();" />
                </td>
            </tr>
           
            
        </table>
    </div>
</asp:Content>
